package com.gxa.dao.impl;

import com.gxa.dao.UserDao;
import com.gxa.dbutils.JdbcBuild;
import com.gxa.pojo.User;

import java.sql.SQLException;

//登录功能：和数据库交互
public class UserDaoImpl extends JdbcBuild implements UserDao {
    @Override
    public User login(String username, String password) throws SQLException {
        String sql = "select * from user where username=? and password=?";
        Object[] params = {username,password};
        return super.queryEntity(User.class,sql,params);
    }



}
